package com.jvm.www;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by 27340 on 2017/12/2.
 */
public class OutOfMemeryDemo {
    public static class Demo{
        private String name;
        public Demo(){}
        public Demo(String name){this.name = name;}
    }

    public static void main(String[] args) {
        Demo demo = new Demo();
        List list = new ArrayList<Demo>();
        while (true){
            list.add(demo);
        }
    }
}
